//
//  ReservationController.swift
//  wechatManager
//
//  Created by tangchunhui on 15/4/24.
//  Copyright (c) 2015年 tangchunhui. All rights reserved.
//

import Foundation


class ReservationController :UICollectionViewController{
    var list:Array<Dictionary<String,String>>=Array<Dictionary<String,String>>()
    
    override func viewDidLoad() {
        self.list=[["name":"张三","order":"1"],["name":"张三","order":"2"]]
        super.viewDidLoad()
    }
    override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
        return 1
        
    }
    override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return self.list.count
    }
    override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        var dataItem:Dictionary<String,String> = self.list[indexPath.row]
        var cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! ReservationCell
        cell.pati_name.text = dataItem["name"]
        cell.orderLabel.text = dataItem["order"]
        return cell
    }
}